* movemail.c: Fix race condition and related bugs (Bug#8836).
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 Jun 2011 17:50:07 +0000 (10:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 Jun 2011 17:50:07 +0000 (10:50 -0700)
commit5d6d8e1a6dba361059d7781f03e3849d5c687971
treeffa24fd3c35b593b36b38da9e3e4fc6416c4b858
parent8dfa78fcb98d7a3f0f1424031cd04170a384f144
* movemail.c: Fix race condition and related bugs (Bug#8836).

(main) [!MAIL_USE_SYSTEM_LOCK]: Prefer mkstemp to mktemp, as this
fixes some race conditions.  Report mkstemp/mktemp errno rather
than a possibly-garbage errno.  Reinitialize the template each
time through the loop, as earlier mkstemp/mktemp calls could have
trashed it.  Pass 0600 (not 0666) to mktemp, for consistency
with mkstemp; the permissions don't matter anyway.
lib-src/ChangeLog
lib-src/movemail.c